﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LeoMVC.Repository
{
    public interface IRepository<TKey,TEntity>
        where TKey:global::System.IComparable
    {
        void Save(TEntity item);
        IEnumerable<TEntity> FindAll();
        IEnumerable<TEntity> FindBy(params TKey[] keys);
        TEntity FindBy(TKey key);
        void Delete(TEntity item);
        void SaveOrUpdate(TEntity item);
        void Update(TEntity item);
    }
}
